package NGUYENHUUDUC_CTLT_EX_TL;

import java.util.Scanner;

public class ex2 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
	System.out.println("Nhap a: ");
	Scanner toan = new Scanner (System.in);
	String tam = toan.nextLine();
	if(tam.isEmpty()==true){
		System.out.println("Can phai nhap so a!");
	}else{
		double a = Double.parseDouble(tam);
		System.out.println("Nhap b:");
		tam = toan.nextLine();
	if(tam.isEmpty()==true){
		System.out.println("Can phai nhap so b!");
	}else{
		double b = Double.parseDouble(tam);
	System.out.println("Mời chọn: 1 - Cộng; 2 - Trừ; 3 - Nhân; 4 - Chia");
	toan = new Scanner (System.in);
	int chon = toan.nextInt();
		if (chon==1){
			System.out.println("Phep cong co ket qua la : "+(a+b));
		}else if (chon==2){
			System.out.println("Phep tru co ket qua la: "+(a-b));
		}else if (chon==3){
			System.out.println("Phep nhan co ket qua la: "+(a*b));
		}else {
			System.out.println("Phep chia co ket qua la: "+(a/b));
		}
	}
	}
	}

}
